"""
URL configuration for 智能视微 project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import to include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from app01.views import manager, index, user

urlpatterns = [
    path('index/', index.index),
    path('user/loginout/', index.loginout),
    path('manager/loginout/', index.loginout),
    # 管理员界面的用户管理
    path('manager/user/list/', manager.manager_user_list),
    path('manager/user/add/', manager.manager_user_add),
    path('manager/user/<int:nid>/delete/', manager.manager_user_delete),
    path('manager/user/<int:nid>/edit/', manager.manager_user_edit),
    # 管理员管理
    path('manager/manager/list/', manager.manager_manager_list),
    path('manager/manager/add/', manager.manager_manager_add),
    path('manager/manager/<int:nid>/delete/', manager.manager_manager_delete),
    path('manager/manager/<int:nid>/edit/', manager.manager_manager_edit),
    # 用户登录
    path('index/user/login/', index.user_login),
    path('index/user/login/user/register/', index.user_register),
    # 管理员登录
    path('index/manager/login/', index.manager_login),
    path('index/manager/register/', index.manager_register),

    # 用户界面
    path('user/function/', user.user_function),
    path('user/function/servlet/', user.user_function_servlet),
    path('user/function/result/', user.user_function_result),
    path('user/edit/', user.user_edit),
    path('user/changePassword/', user.user_changePassword),
    path('user/order/list/', user.user_order_list),
    path('user/recharge', user.user_recharge),

]
